/**
 * Created by jiaoyumin on 2017/9/29.
 */
export default {
  istourism: state => state.istourism,
  currentMenus: state => state.currentMenus,
  // taOrGov:state => state.taOrGov,
  token: state => {
    return state.token ? state.token : sessionStorage.getItem("token");
  },
  userinfo: state => {
    return Object.keys(state.userinfo).length > 0 ? state.userinfo : JSON.parse(sessionStorage.getItem("userinfo"))
  },
  supportinfo: state => state.supportinfo,
  process: state => state.process,
  sysinfo: state => {
    return Object.keys(state.sysinfo).length > 0 ? state.sysinfo : JSON.parse(sessionStorage.getItem("sysinfo"))
  },
  agencyinfo: state => {
    return Object.keys(state.agencyinfo).length > 0 ? state.agencyinfo : JSON.parse(sessionStorage.getItem("agencyinfo"))
  },
  wljds: state => state.wljds,
  zzjds: state => state.zzjds,
  zzcjs: state => state.zzcjs,
  reportDetail: state => {
    return state.reportDetail && Object.is(state.reportDetail,{}) ? state.reportDetail : JSON.parse(sessionStorage.getItem("reportDetail"))
  },
  reportGovDetail: state => state.reportGovDetail,
  chartsData: state => state.chartsData,
  provinces: state => {
    return state.provinces.length === 0 ? JSON.parse(localStorage.getItem("provinces")) : state.provinces;
  },
  cities: state => {
    return Object.keys(state.cities).length > 0 ? this.cities : JSON.parse(localStorage.getItem("cities"))
  },
  areas: state => {
    return Object.keys(state.areas).length > 0 ? this.areas : JSON.parse(localStorage.getItem("areas"))
  },
  reportList: state => state.reportList,
  govprocess: state => {
    return Object.keys(state.govprocess).length > 0 ? state.govprocess : JSON.parse(sessionStorage.getItem('govprocess'))
  },
  agencyList: state => state.agencyList,
  stopedAgencyList: state => state.stopedAgencyList,
  processList: state => state.processList,
  taPdfUrl:state => state.taPdfUrl,
  govPdfUrl:state => state.govPdfUrl,
  auditLevel:state => state.auditLevel,
}
